export const getParamsToString = (obj) => {
    let str = '';
    for (const key in obj) {
        if (obj.hasOwnProperty(key))
            str += `${key}=${obj[key]}&`;
    }
    return str.substr(0, str.length - 1);
};

export const getParamsToString1 = (obj) => {
    let str = '';
    for (const key in obj) {
        if (obj.hasOwnProperty(key))
            str += `${key}=${encodeURIComponent(obj[key])}&`;
    }
    return str.substr(0, str.length - 1);
};